This invention relates to self-booting programs stored in non-volatile memories, and, more particularly, to self-booting programs that may be updated.
Firmware, or programs stored in non-volatile memories, are employed in microprocessor systems which are used as specialized controllers or to implement specific functions. Examples are microprocessor systems to control data storage drives, to control accessors having interacting servo motors, or to control communication links between interacting mechanisms.
Embedded systems, where the microprocessor and firmware system is embedded in a component, may update the firmware in two ways. The first simply involves overwriting the non-volatile memory code with a new image at update time. The problem with this approach is that any fault during the firmware update process would result in xe2x80x9cbrain deadxe2x80x9d product, which may require replacement of the component.
A second approach is to incorporate a boot sector to initialize the firmware system, and the boot sector usually can be erased and programmed separately from other parts of the code image. In this case, a firmware update fault would result in a working boot sector, so that the product would not function normally, but it could be fixed without component replacement. The problem with this approach is that it is sufficiently complicated that it requires human intervention or a special process to restore the product to an operational state. Also, the hardware transmission protocol that is used to update the firmware would have to be in an update routine contained in the boot sector. Any time the transmission routines or firmware update routines are changed, the boot sector must be changed. This results in a greater likelihood that the boot sector would encounter a firmware update fault. Using a boot sector in this manner becomes even more complex for products that use a variety of complex transmission protocols.
An error during a boot sector firmware update would be fatal, making the product essentially brain dead. Similarly, the boot sector may provide a recovery procedure to be employed if the rest of the non-volatile program device is corrupted or unusable. However, the complexity of the boot sector is increased dramatically, and these routines change fairly often, requiring the boot sector to be updated more often, again exposing the boot sector to a greater chance of error, making the product brain dead.
An object of the present invention is to increase the availability of error-free and updated firmware code.
Disclosed are a computer implemented method and a system for providing a redundant, updatable, self-booting firmware program. A sectored, non-volatile memory, having separately erasable sectors is provided, the memory storing at least two copies of operational code, each operational code copy stored in at least one of the sectors separate from other of the copy sectors. Each operational code copy has information, for example, in a header, indicating the relative update level of the operational code copy, so that the copies may be separately updated and have different update levels. A boot program is stored in at least one of the sectors of the non-volatile memory, separate from the operational code sectors. The boot program operates a processor to read the update level information of the headers to determine the most recent update level of the operational code copies, and the boot processor executes the operational code copy having the most recent update level.
Additionally, the boot program, prior to reading the headers, operates the processor to test the operational code copies to determine whether any of the operational code copies is corrupted. If any of the operational copies is corrupted, only the header(s) of those copies determined to be uncorrupted in the testing are read, and the boot processor executes the operational code copy having the most recent update level.
Hence, a relatively simple boot program is employed, without a recovery routine, making the need to update the boot program a rare event.
For a fuller understanding of the present invention, reference should be made to the following detailed description taken in conjunction with the accompanying drawings.